3.2.89 \(\int \frac {(e+f x) \sinh (c+d x)}{a+i a \sinh (c+d x)} \, dx\) [189]

Optimal. Leaf size=90 \[ -\frac {i e x}{a}-\frac {i f x^2}{2 a}-\frac {2 i f \log \left (\cosh \left (\frac {c}{2}+\frac {i \pi }{4}+\frac {d x}{2}\right )\right )}{a d^2}+\frac {i (e+f x) \tanh \left (\frac {c}{2}+\frac {i \pi }{4}+\frac {d x}{2}\right )}{a d} \]

[Out]

-I*e*x/a-1/2*I*f*x^2/a-2*I*f*ln(cosh(1/2*c+1/4*I*Pi+1/2*d*x))/a/d^2+I*(f*x+e)*tanh(1/2*c+1/4*I*Pi+1/2*d*x)/a/d

________________________________________________________________________________________

Rubi [A]
time = 0.08, antiderivative size = 90, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.148, Rules used = {5676, 3399, 4269, 3556} \begin {gather*} -\frac {2 i f \log \left (\cosh \left (\frac {c}{2}+\frac {d x}{2}+\frac {i \pi }{4}\right )\right )}{a d^2}+\frac {i (e+f x) \tanh \left (\frac {c}{2}+\frac {d x}{2}+\frac {i \pi }{4}\right )}{a d}-\frac {i e x}{a}-\frac {i f x^2}{2 a} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((e + f*x)*Sinh[c + d*x])/(a + I*a*Sinh[c + d*x]),x]

[Out]

((-I)*e*x)/a - ((I/2)*f*x^2)/a - ((2*I)*f*Log[Cosh[c/2 + (I/4)*Pi + (d*x)/2]])/(a*d^2) + (I*(e + f*x)*Tanh[c/2
 + (I/4)*Pi + (d*x)/2])/(a*d)

Rule 3399

Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[(2*a)^n, Int[(c
 + d*x)^m*Sin[(1/2)*(e + Pi*(a/(2*b))) + f*(x/2)]^(2*n), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && EqQ[a^2
- b^2, 0] && IntegerQ[n] && (GtQ[n, 0] || IGtQ[m, 0])

Rule 3556

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rule 4269

Int[csc[(e_.) + (f_.)*(x_)]^2*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(-(c + d*x)^m)*(Cot[e + f*x]/f), x
] + Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Cot[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 5676

Int[(((e_.) + (f_.)*(x_))^(m_.)*Sinh[(c_.) + (d_.)*(x_)]^(n_.))/((a_) + (b_.)*Sinh[(c_.) + (d_.)*(x_)]), x_Sym
bol] :> Dist[1/b, Int[(e + f*x)^m*Sinh[c + d*x]^(n - 1), x], x] - Dist[a/b, Int[(e + f*x)^m*(Sinh[c + d*x]^(n
- 1)/(a + b*Sinh[c + d*x])), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && IGtQ[m, 0] && IGtQ[n, 0]

Rubi steps

\begin {align*} \int \frac {(e+f x) \sinh (c+d x)}{a+i a \sinh (c+d x)} \, dx &=i \int \frac {e+f x}{a+i a \sinh (c+d x)} \, dx-\frac {i \int (e+f x) \, dx}{a}\\ &=-\frac {i e x}{a}-\frac {i f x^2}{2 a}+\frac {i \int (e+f x) \csc ^2\left (\frac {1}{2} \left (i c+\frac {\pi }{2}\right )+\frac {i d x}{2}\right ) \, dx}{2 a}\\ &=-\frac {i e x}{a}-\frac {i f x^2}{2 a}+\frac {i (e+f x) \tanh \left (\frac {c}{2}+\frac {i \pi }{4}+\frac {d x}{2}\right )}{a d}-\frac {(i f) \int \coth \left (\frac {c}{2}-\frac {i \pi }{4}+\frac {d x}{2}\right ) \, dx}{a d}\\ &=-\frac {i e x}{a}-\frac {i f x^2}{2 a}-\frac {2 i f \log \left (\cosh \left (\frac {c}{2}+\frac {i \pi }{4}+\frac {d x}{2}\right )\right )}{a d^2}+\frac {i (e+f x) \tanh \left (\frac {c}{2}+\frac {i \pi }{4}+\frac {d x}{2}\right )}{a d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(239\) vs. \(2(90)=180\).
time = 0.41, size = 239, normalized size = 2.66 \begin {gather*} \frac {-2 d f x \cosh \left (c+\frac {d x}{2}\right )-i \cosh \left (\frac {d x}{2}\right ) \left (d^2 x (2 e+f x)+4 i f \text {ArcTan}\left (\text {sech}\left (c+\frac {d x}{2}\right ) \sinh \left (\frac {d x}{2}\right )\right )+2 f \log (\cosh (c+d x))\right )+4 i d e \sinh \left (\frac {d x}{2}\right )+2 i d f x \sinh \left (\frac {d x}{2}\right )+2 d^2 e x \sinh \left (c+\frac {d x}{2}\right )+d^2 f x^2 \sinh \left (c+\frac {d x}{2}\right )+4 i f \text {ArcTan}\left (\text {sech}\left (c+\frac {d x}{2}\right ) \sinh \left (\frac {d x}{2}\right )\right ) \sinh \left (c+\frac {d x}{2}\right )+2 f \log (\cosh (c+d x)) \sinh \left (c+\frac {d x}{2}\right )}{2 a d^2 \left (\cosh \left (\frac {c}{2}\right )+i \sinh \left (\frac {c}{2}\right )\right ) \left (\cosh \left (\frac {1}{2} (c+d x)\right )+i \sinh \left (\frac {1}{2} (c+d x)\right )\right )} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((e + f*x)*Sinh[c + d*x])/(a + I*a*Sinh[c + d*x]),x]

[Out]

(-2*d*f*x*Cosh[c + (d*x)/2] - I*Cosh[(d*x)/2]*(d^2*x*(2*e + f*x) + (4*I)*f*ArcTan[Sech[c + (d*x)/2]*Sinh[(d*x)
/2]] + 2*f*Log[Cosh[c + d*x]]) + (4*I)*d*e*Sinh[(d*x)/2] + (2*I)*d*f*x*Sinh[(d*x)/2] + 2*d^2*e*x*Sinh[c + (d*x
)/2] + d^2*f*x^2*Sinh[c + (d*x)/2] + (4*I)*f*ArcTan[Sech[c + (d*x)/2]*Sinh[(d*x)/2]]*Sinh[c + (d*x)/2] + 2*f*L
og[Cosh[c + d*x]]*Sinh[c + (d*x)/2])/(2*a*d^2*(Cosh[c/2] + I*Sinh[c/2])*(Cosh[(c + d*x)/2] + I*Sinh[(c + d*x)/
2]))

________________________________________________________________________________________

Maple [A]
time = 1.27, size = 86, normalized size = 0.96

method result size
risch \(-\frac {i f \,x^{2}}{2 a}-\frac {i e x}{a}+\frac {2 i f x}{a d}+\frac {2 i f c}{a \,d^{2}}-\frac {2 \left (f x +e \right )}{d a \left ({\mathrm e}^{d x +c}-i\right )}-\frac {2 i f \ln \left ({\mathrm e}^{d x +c}-i\right )}{a \,d^{2}}\) \(86\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x+e)*sinh(d*x+c)/(a+I*a*sinh(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

-1/2*I*f*x^2/a-I*e*x/a+2*I*f/a/d*x+2*I*f/a/d^2*c-2*(f*x+e)/d/a/(exp(d*x+c)-I)-2*I*f/a/d^2*ln(exp(d*x+c)-I)

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 109, normalized size = 1.21 \begin {gather*} \frac {1}{2} \, f {\left (\frac {-i \, d x^{2} + {\left (d x^{2} e^{c} - 4 \, x e^{c}\right )} e^{\left (d x\right )}}{i \, a d e^{\left (d x + c\right )} + a d} - \frac {4 i \, \log \left ({\left (e^{\left (d x + c\right )} - i\right )} e^{\left (-c\right )}\right )}{a d^{2}}\right )} - {\left (\frac {i \, {\left (d x + c\right )}}{a d} + \frac {2}{{\left (a e^{\left (-d x - c\right )} + i \, a\right )} d}\right )} e \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)*sinh(d*x+c)/(a+I*a*sinh(d*x+c)),x, algorithm="maxima")

[Out]

1/2*f*((-I*d*x^2 + (d*x^2*e^c - 4*x*e^c)*e^(d*x))/(I*a*d*e^(d*x + c) + a*d) - 4*I*log((e^(d*x + c) - I)*e^(-c)
)/(a*d^2)) - (I*(d*x + c)/(a*d) + 2/((a*e^(-d*x - c) + I*a)*d))*e

________________________________________________________________________________________

Fricas [A]
time = 0.40, size = 97, normalized size = 1.08 \begin {gather*} -\frac {d^{2} f x^{2} + 2 \, {\left (d^{2} x + 2 \, d\right )} e - {\left (-i \, d^{2} f x^{2} - 2 i \, d^{2} x e + 4 i \, d f x\right )} e^{\left (d x + c\right )} + 4 \, {\left (i \, f e^{\left (d x + c\right )} + f\right )} \log \left (e^{\left (d x + c\right )} - i\right )}{2 \, {\left (a d^{2} e^{\left (d x + c\right )} - i \, a d^{2}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)*sinh(d*x+c)/(a+I*a*sinh(d*x+c)),x, algorithm="fricas")

[Out]

-1/2*(d^2*f*x^2 + 2*(d^2*x + 2*d)*e - (-I*d^2*f*x^2 - 2*I*d^2*x*e + 4*I*d*f*x)*e^(d*x + c) + 4*(I*f*e^(d*x + c
) + f)*log(e^(d*x + c) - I))/(a*d^2*e^(d*x + c) - I*a*d^2)

________________________________________________________________________________________

Sympy [A]
time = 0.16, size = 73, normalized size = 0.81 \begin {gather*} \frac {- 2 e - 2 f x}{a d e^{c} e^{d x} - i a d} - \frac {i f x^{2}}{2 a} + \frac {x \left (- i d e + 2 i f\right )}{a d} - \frac {2 i f \log {\left (e^{d x} - i e^{- c} \right )}}{a d^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)*sinh(d*x+c)/(a+I*a*sinh(d*x+c)),x)

[Out]

(-2*e - 2*f*x)/(a*d*exp(c)*exp(d*x) - I*a*d) - I*f*x**2/(2*a) + x*(-I*d*e + 2*I*f)/(a*d) - 2*I*f*log(exp(d*x)
- I*exp(-c))/(a*d**2)

________________________________________________________________________________________

Giac [A]
time = 0.43, size = 111, normalized size = 1.23 \begin {gather*} -\frac {i \, d^{2} f x^{2} e^{\left (d x + c\right )} + d^{2} f x^{2} + 2 i \, d^{2} e x e^{\left (d x + c\right )} + 2 \, d^{2} e x - 4 i \, d f x e^{\left (d x + c\right )} + 4 i \, f e^{\left (d x + c\right )} \log \left (e^{\left (d x + c\right )} - i\right ) + 4 \, d e + 4 \, f \log \left (e^{\left (d x + c\right )} - i\right )}{2 \, {\left (a d^{2} e^{\left (d x + c\right )} - i \, a d^{2}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)*sinh(d*x+c)/(a+I*a*sinh(d*x+c)),x, algorithm="giac")

[Out]

-1/2*(I*d^2*f*x^2*e^(d*x + c) + d^2*f*x^2 + 2*I*d^2*e*x*e^(d*x + c) + 2*d^2*e*x - 4*I*d*f*x*e^(d*x + c) + 4*I*
f*e^(d*x + c)*log(e^(d*x + c) - I) + 4*d*e + 4*f*log(e^(d*x + c) - I))/(a*d^2*e^(d*x + c) - I*a*d^2)

________________________________________________________________________________________

Mupad [B]
time = 0.55, size = 74, normalized size = 0.82 \begin {gather*} -\frac {f\,x^2\,1{}\mathrm {i}}{2\,a}-\frac {2\,\left (e+f\,x\right )}{a\,d\,\left ({\mathrm {e}}^{c+d\,x}-\mathrm {i}\right )}+\frac {x\,\left (2\,f-d\,e\right )\,1{}\mathrm {i}}{a\,d}-\frac {f\,\ln \left ({\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c-\mathrm {i}\right )\,2{}\mathrm {i}}{a\,d^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((sinh(c + d*x)*(e + f*x))/(a + a*sinh(c + d*x)*1i),x)

[Out]

(x*(2*f - d*e)*1i)/(a*d) - (2*(e + f*x))/(a*d*(exp(c + d*x) - 1i)) - (f*x^2*1i)/(2*a) - (f*log(exp(d*x)*exp(c)
 - 1i)*2i)/(a*d^2)

________________________________________________________________________________________